<template>
  <el-table :data="list" max-height="600px">
    <el-table-column property="code" label="设备编码" width="190" align="center"/>
    <el-table-column property="name" label="设备名称" align="center"/>
    <el-table-column property="deleteDvBrandCode" label="引用品牌编码" width="190" align="center"/>
    <el-table-column property="deleteDvBrandName" label="引用品牌名称" align="center"/>
    <el-table-column label="操作" align="center">
      <template slot-scope="scope">
        <el-button size="small" type="primary" @click="navToDeviceInfoUnbind(scope.row)">去解绑</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: "deviceInUsedList",

  props: {
    list: {
      type: Array,
      default() {
        return []
      }
    }
  },

  methods:{
    // 跳转设备管理页面解绑
    navToDeviceInfoUnbind(row){
      this.$emit("close-dialog")
      this.$router.push({
        path: '/device/deviceInfo',
        query: {brandName: row.deleteDvBrandName}
      })
    },
  }
}
</script>

<style lang="scss" scoped>

</style>
